package com.cqjtu.store.cart.pojo.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * @description: 购物车添加信息
 * @project: store
 */
@Data
@ApiModel(value = "购物车添加信息",description = "对购物车添加信息进行封装")
@AllArgsConstructor
@NoArgsConstructor
public class CartInsertDTO {
    // 用户id
    @ApiModelProperty(value = "用户id",name = "userId",example = "4",required = true)
    @NotNull(message = "用户id不能为空")
    private Integer userId;
    // 商品id
    @ApiModelProperty(value = "商品id",name = "productId",required = true,example = "10000013")
    @NotNull(message = "商品id不能为空")
    private Integer productId;
    // 商品单价
    @ApiModelProperty(value = "商品单价",name = "price")
    private Long price;
    // 数量
    @ApiModelProperty(value = "数量",name = "num",required = true,example = "1")
    @NotNull(message = "数量不能为空")
    private Integer num;
    // 创建用户
    @ApiModelProperty(value = "创建用户",name = "createdUser")
    private String createdUser;
    // 创建时间
    @ApiModelProperty(value = "创建时间",name = "createdTime")
    private Date createdTime;
    // 最后修改用户
    @ApiModelProperty(value = "最后修改用户",name = "modifiedUser")
    private String modifiedUser;
    // 最后修改时间
    @ApiModelProperty(value = "最后修改时间",name = "modifiedTime")
    private Date modifiedTime;
}
